package com.bto.solar.work.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * <p>
 * 电站投保信息
 * </p>
 *
 * @author adrian
 * @since 2023-08-28
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "Insurance对象", description = "电站投保信息")
public class Insurance implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("保险编号")
    @TableId(value = "insurance_number", type = IdType.INPUT)
    private String insuranceNumber;

    @ApiModelProperty("订单ID")
    private String orderId;

    @ApiModelProperty("投保类型（1：手动投保（上传文件），2：邮件投保（发送邮件））")
    private Byte insureType;

    @ApiModelProperty("1 - 财产险	2 - 商业险	3 - 交强险	4 - 其他")
    private Byte insuranceType;

    @ApiModelProperty("保险开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp startDate;

    @ApiModelProperty("保险结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp endDate;

    @ApiModelProperty("保险公司")
    private String insuranceCompany;

    @ApiModelProperty("投保金额")
    private String insuredAmount;

    @ApiModelProperty("第一受益人")
    private String beneficiary;

    @ApiModelProperty("保险保单（PDF上传）")
    private String insurancePolicyP;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;
}
